<%@page contentType="text/html; charset=utf-8" language="java" errorPage="error.jsp"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
String subtitle = "找回密码";
String scripts = "/static/js/Validform_min.js";
String styles = "/static/css/validation.css?v=0.0.1";
%>
<%@ include file="/include/header.jspf"%>
<script>
$(document).ready(function() {
	
	$("#accountForm").Validform({
		btnSubmit:"#btn_sub",
		tiptype:function(msg,o,cssctl){
			if(o.obj){
					var objtip=o.obj.parent().parent().find(".Validform_checktip");
					cssctl(objtip,o.type);
					objtip.text(msg);
				}
		},
		tipSweep:false,
		postonce:true
	});
	
	$("#captcha_refresh,#captcha_img").click(function(){
		var o = $("#captcha_img");
		var ts = new Date().getTime();
		var src = o.attr("src");
		src = src.substr(0,src.indexOf("ts"));
		src += "ts="+ts;
		o.attr("src",src);
	});
});
</script>

<body>
  <div id="header" class="wraper">
  </div>
  <div id="bodier" class="wraper">
	<form id="accountForm" action="/account/RetakePasswordByAnswer.do" method="post">
		<div class="aline">
			<label>您的用户名：</label>
			<div>
				<input type="text" name="name" datatype="e" nullmsg="请输入邮箱地址！" errormsg="请输入邮箱地址！"/>
			</div>
			<c:choose>
			   <c:when test="${null!=errors.name}">    
				   <div class="Validform_checktip Validform_wrong">
						<c:forEach items="${errors.name}" var="err">
							${err}
						</c:forEach>
					</div>
			   </c:when>
			   <c:otherwise>  
				<div class="Validform_checktip"></div>
			   </c:otherwise>
			</c:choose>
		</div>

		<div class="aline">	
			<label>验证码：</label>
			<div>
				<input type="text" name="captcha" datatype="s4-10" nullmsg="请输入验证码！" errormsg="请输入验证码（4-10个字符）！"/>
			<c:choose>
			   <c:when test="${null!=errors.captcha}">    
				   <div class="Validform_checktip Validform_wrong">
						<c:forEach items="${errors.captcha}" var="err">
							${err}
						</c:forEach>
					</div>
			   </c:when>
			   <c:otherwise>  
				<div class="Validform_checktip"></div>
			   </c:otherwise>
			</c:choose>			
				<div>
					<img id="captcha_img" width="150px" height="60px" src="/captcha.jpg?token=8513499595290785276&ts=0" style="border:1px solid #ddd">
					<a id="captcha_refresh" href="#" title="看不清左边的字符">看不清？</a>
				</div>
			</div>
		</div>

		<div class="aline">
			<input id="btn_sub" name="_finish" type="submit" value="完成"/>
			<input name="token" type="hidden" value="8513499595290785276"/>
		</div>
	</form> 
   </div>

<%@ include file="/include/footer.jspf"%>